/*
* 基础术语预定义
*/
#pragma once

// 项目名称定义 -----------------------------------------------------------------------------------------
#define ZQ_VER_PREFIX					"ABM"			// 长度必须小于9
#define AKM_BLE_NAME 					"3001001000"
#define AKM_BLE_NAME_SUFFIX 			"+"				// 用"+"把AKM_BLE_NAME补全到11字节
#define CFG_DEVICE_TYPE					1000

// 基础术语预定义 ----------------------------------------------------------------------------------------
// 厂商编码
#define CFG_MANUFACTURE_CODE			"AKM2yk"

// contoller type
#define CTRL_POS						"0"
#define CTRL_REMOTECTRL					"1"
#define CTRL_GPRSCTRL					"2"
#define CTRL_4GCTRL						"3"
#define CTRL_SEECTRL					"4"
#define CTRL_CTRL						"9"		// 自定义, 纯控制器
// module type
#define MDU_2G 							"2g"
#define MDU_4G							"4g"
#define MDU_NB							"nb"
#define MDU_NA							"na"	// 自定义, 纯控制器
// device type
#define DEV_ONLY_POS					"00"
#define DEV_WO_FRZE						"01"
#define DEV_LI_FRZE						"02"
#define DEV_WO_COOL						"04"
#define DEV_LI_COOL						"08"
#define DEV_COOL_FRZE					"10"
#define DEV_CAR_FRZE					"11"
#define DEV_MILK_COOL					"12"
#define DEV_MILK_WIND					"13"
#define DEV_CAR_COOL					"14"
#define DEV_COOL_HOT					"20"
#define DEV_HOT							"21"
#define DEV_WIND						"24"
#define DEV_DYN_COOL					"28"	// Dynamic performance refrigerated cabinets 1002
#define DEV_WO_FRZE_661					"31"
// function
#define FUN_GPS							(1)
#define FUN_WIFI						(2)		// WIFI定位
#define FUN_BT							(3)		// 带蓝牙广播
#define FUN_TCM							(4)		// 带温度采集 
#define FUN_COMPRESS					(5)		// 带压缩机控制 
#define FUN_DOORSW						(6)		// 带门开关采集
#define FUN_BATTERY						(7)		// 带电池
#define FUN_TEMPCTRL					(8)		// 带温度调节
#define FUN_POWERCHK					(9)
#define FUN_FANCTRL						(10)
#define FUN_HUMMANCHK					(11)	// 带人流量采集
#define FUN_GRAPHCHK					(12)	// 图像采集
#define FUN_ANGLECHK					(13)	// 带角度传感器
#define FUN_LIGHTCTRL					(14)
#define FUN_LIGHTCURRENTCHK				(15)
#define FUN_SURROUDTENPCHK				(16)
#define FUN_DYN_IDENTIFY				(17) 	// 动态识别功能
#define FUN_POWERSAVE					(19)
#define FUN_PHOTO_ADJUST				(20)	// 拍照模式调节功能
#define FUN_CLOUD_TRIG					(21)	// 云端触发功能
#define FUN_LIGHTMODECTRL				(24)


// device functions description table, 不建议使用enum来定义，因为这样宏定义后不会让编译器认识产生分支编译效果
#define MBT_582_8910 			0		// 582+8910 
#define MBT_582_8850			1	    // 582+8850 新
#define MBT_582_8850_md			2	    // 582+8850 old/md/hsq
#define MBT_582_8850_326		3	    // 582+8850 zy326
#define MBT_8850_ONLY			4		// 8850
// #define ZQ_DISPLAY_PANEL_TYPE
#define	DPT_INTEGRAL_0			4	 	// 4 = integral display panel type, 0 key, 3 digital, 5 grid, 7 seg, 12 icon, tm1618 driver; 
#define	DPT_INTEGRAL_3			1	 	// 1 = integral display panel type, 3 key, 3 digital, 5 grid, 7 seg, 12 icon, tm1618 driver; 
#define	DPT_INTEGRAL_3y			6		// 6 = integral display panel type(圆角), 3 key, 3 digital, 4 grid, 8 seg, 6 icon, tm1618 driver; 
#define	DPT_INTEGRAL_4			8	 	// 8 = integral display panel type, 4 key, 3 digital, 5 grid, 7 seg, 12 icon, tm1618 driver; 
#define	DPT_INTEGRAL_326		5		// 5 = integral display panel type(自研), 4 key, 3 digital, 4 grid, 8 seg, 8 icon, m582 driver;
#define	DPT_SPLIT_1				2	 	// 2 = split display panel type, 1 key, 2 digital, 3 grid, 7 seg, 2 icon, tm1628 driver;
#define	DPT_SPLIT_2				3	 	// 2 = split display panel type, 2 key, 2 digital, 3 grid, 7 seg, 2 icon, tm1628 driver;
#define	DPT_SPLIT_1x			7	 	// 7 = split display panel type(斜体), 1 key, 2 digital, 2 grid, 8 seg, 1 icon, tm1628 driver;

// 控制器工作模式 
#define CTRL_MODE_COOL		1
#define CTRL_MODE_FREEZE	2
#define CTRL_MODE_HOT		4
#define CTRL_MODE_ECO		8		// Energy saving mode
// 4G连接模式
typedef enum {
	MODE_4G_NONE = 0x0,		// 没有4G数据连接
	MODE_4G_DIAL,			// 数据连接成功，但是没有连接上云平台
	MODE_4G_CONNECT,		// 连接云平台
}ZyMode4g;

